package github.kawaiior.yuanchuxiuzhen.common.entity.model;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import github.kawaiior.yuanchuxiuzhen.common.entity.hell.SoulIronBeastEntity;
import net.minecraft.client.renderer.entity.model.EntityModel;
import net.minecraft.client.renderer.model.ModelRenderer;

public class SoulIronBeastModel extends EntityModel<SoulIronBeastEntity> {
    private final ModelRenderer rightarm;
    private final ModelRenderer leftarm;
    private final ModelRenderer leftleg;
    private final ModelRenderer rightleg;
    private final ModelRenderer body;

    public SoulIronBeastModel() {
        this.textureWidth = 84;
        this.textureHeight = 80;

        this.rightarm = new ModelRenderer(this);
        this.rightarm.setRotationPoint(-6.0F, 12.0F, -7.0F);
        this.rightarm.setTextureOffset(0, 0).addBox(-7.0F, -8.0F, -6.0F, 9, 18, 9, 0, false);
        this.rightarm.setTextureOffset(52, 60).addBox(-6.0F, 0.0F, -5.0F, 8, 12, 8, 0, false);

        this.leftarm = new ModelRenderer(this);
        this.leftarm.setRotationPoint(6.0F, 12.0F, -7.0F);
        this.leftarm.setTextureOffset(0, 27).addBox(-2.0F, -8.0F, -6.0F, 9, 18, 9, 0,false);
        this.leftarm.setTextureOffset(52, 60).addBox(-2.0F, 0.0F, -5.0F, 8, 12, 8, 0, false);

        this.leftleg = new ModelRenderer(this);
        this.leftleg.setRotationPoint(6.0F, 12.0F, 7.0F);
        this.leftleg.setTextureOffset(36, 27).addBox(-2.0F, -8.0F, -3.0F, 9, 18, 9, 0, false);
        this.leftleg.setTextureOffset(52, 60).addBox(-2.0F, 0.0F, -3.0F, 8, 12, 8, 0, false);

        this.rightleg = new ModelRenderer(this);
        this.rightleg.setRotationPoint(-6.0F, 12.0F, 7.0F);
        this.rightleg.setTextureOffset(36, 0).addBox(-7.0F, -8.0F, -3.0F, 9, 18, 9, 0, false);
        this.rightleg.setTextureOffset(52, 60).addBox(-6.0F, 0.0F, -3.0F, 8, 12, 8, 0, false);

        this.body = new ModelRenderer(this);
        this.body.setRotationPoint(0.0F, 16.0F, 0.0F);
        this.body.setTextureOffset(0, 54).addBox(-6.0F, -6.0F, -7.0F, 12, 12, 14, 0, false);
    }

    @Override
    public void setRotationAngles(SoulIronBeastEntity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {

    }

    @Override
    public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
        this.rightarm.render(matrixStack, buffer, packedLight, packedOverlay);
        this.leftarm.render(matrixStack, buffer, packedLight, packedOverlay);
        this.leftleg.render(matrixStack, buffer, packedLight, packedOverlay);
        this.rightleg.render(matrixStack, buffer, packedLight, packedOverlay);
        this.body.render(matrixStack, buffer, packedLight, packedOverlay);
    }
}
